# -*- coding:utf8 -*-


def parse_packed_header(str_):
    """
    将字符串转回字典
    :param str_:
    :return:
    """
    heafer = {}
    for line in str_.split('\n'):
        line = line.strip()
        if not line:
            continue
        sep = line.find(':')
        key = line[:sep]
        value = line[sep+1:]
        heafer[key] = value

    return heafer